package com.ljpz.cart.service;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.ljpz.common.service.ApiService;
import com.ljpz.sso.query.api.UserQueryService;
import com.ljpz.sso.query.bean.User;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * Created by liujunchen on 2016/12/23.
 */
@Service
public class UserService {
    /*@Autowired
    private ApiService apiService  ;
    private  static  final ObjectMapper  MAPPER = new ObjectMapper()  ;*/
/*
    @Value("${LJPZ_SSO_URL}")
    public  String  LJPZ_SSO_URL ;
*/

    @Autowired
    private UserQueryService  userQueryService ;

    /**
     * 根据token查询用户信息
     *
     * @param token
     * @return
     */
    public User queryByToken(String token){
        return  this.userQueryService.queryUserByToken(token)  ;

    }
}
